package com.tust.service.impl;

import com.tust.dao.GradeDao;
import com.tust.domain.Grade;
import com.tust.service.GradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GradeServiceImpl implements GradeService {
    @Autowired
    private GradeDao gradeDao;

    @Override
    public int insertGrade(Grade grade) {
        return gradeDao.insertGrade(grade);
    }

    @Override
    public int deleteGrade(Grade grade) {
        return gradeDao.deleteGrade(grade);
    }

    @Override
    public int updateGrade(Grade oldGrade, Grade grade) {
        return gradeDao.updateGrade(oldGrade, grade);
    }

    @Override
    public List<Grade> selectGrade(Grade grade) {
        return gradeDao.selectGrade(grade);
    }

    @Override
    public List<Grade> selectGradeByStudentNum(String studentNum) {
        return gradeDao.selectGradeByStudentNum(studentNum);
    }

    @Override
    public List<Grade> selectGradeByCourseNum(String courseNum) {
        return gradeDao.selectGradeByCourseNum(courseNum);
    }

    @Override
    public List<Grade> selectGradeByExamTimes(String examTimes) {
        return gradeDao.selectGradeByExamTimes(examTimes);
    }

    @Override
    public List<Grade> selectGradeByRegularGrade(String regularGrade) {
        return gradeDao.selectGradeByRegularGrade(regularGrade);
    }

    @Override
    public List<Grade> selectGradeByExamGrade(String examGrade) {
        return gradeDao.selectGradeByExamGrade(examGrade);
    }

    @Override
    public List<Grade> selectGradeByTotalGrade(String totalGrade) {
        return gradeDao.selectGradeByTotalGrade(totalGrade);
    }

    @Override
    public List<Grade> selectGradeAll() {
        return gradeDao.selectGradeAll();
    }
}
